VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "clsScoreTableLevel"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

Public BestScores As New clsScoreTable
Public BestTimes As New clsScoreTable

Private Sub Class_Initialize()
    BestScores.Count = 3
    BestTimes.Count = 3
End Sub

Public Function Load(ByVal ID As String) As Boolean
    Load = BestScores.Load(ID & "_Scores")
    If Load Then Load = BestTimes.Load(ID & "_Times")
End Function

'====================================================================================
'Read: Load data from an already opened file handle
'====================================================================================
Public Function Read(ByVal UseFileNumber As Long) As Boolean
    Read = BestScores.Read(UseFileNumber)
    If Read Then Read = BestTimes.Read(UseFileNumber)
End Function

'====================================================================================
'Append
'====================================================================================
Public Function Append(Optional ByVal UseFileNumber As Long = 0) As Long
    Append = BestScores.Save(UseFileNumber)
    If Append Then Append = BestTimes.Save(UseFileNumber)
End Function

Public Function Save(Optional ByVal UseFileNumber As Long = 0)
    BestScores.Save UseFileNumber
    BestTimes.Save UseFileNumber
End Function

Private Sub Class_Terminate()
    Set BestScores = Nothing
    Set BestTimes = Nothing
End Sub
